package com.zhi.rabbitmq;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author WenZhi Luo
 * @version 1.0
 * @date 2020/3/14 14:20
 */
@Configuration
public class MQConfig {
    public static final String QUEUE = "queue";
    public static final String MIAOSHA_QUEUE = "miaosha.queue";

    @Bean
    public Queue queue(){
        //如果我们声明一个持久队列(该队列将在服务器重启后继续存在)，则为true。
        return new Queue(QUEUE,true);
    }
}